<?php

namespace app\api\controller;

use app\api\model\wanlshop\OrderGoods as OrderGoodsModel;
use app\common\controller\Api;
use think\Db;


/**
 * 证书接口
 */
class Cert extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function _initialize()
    {
        $this->model = new OrderGoodsModel();
    }

    public function detail()
    {
        $certificate_code = $this->request->param('certificate_code');

        if(!$certificate_code){
            $this->error('参数错误');
        }

        $info =$this->model->where(['certificate_code'=>$certificate_code])
//            ->field('id,name,image,range')
            ->find();

        $this->success('ok',$info);
    }


}
